package com.tchhy.provider.data.profit.response

import android.os.Parcel
import android.os.Parcelable

/**
 * @author: pujialin
 * @date: 2020-10-19 16:57
 * @desc:
 */
class SettlementIncomeRes(): Parcelable {
    var orderNum: String? = null
    //支付金额
    var payAmount: Long? = null
    //支付时间
    var payTime: String? = null
    //收益额
    var amount: Long? = null
    //服务费率
    var ratio1: Long? = null
    //服务名称
    var serviceName: String? = null
    //1.app 活动 2.商城订单 3.直播 4.问诊 5.充值订单 6.医护 7.付费圈子
    var type:Int? = null
    //分佣金额
    var amount1:Long? = null

    constructor(parcel: Parcel) : this() {
        orderNum = parcel.readString()
        payAmount = parcel.readValue(Long::class.java.classLoader) as? Long
        payTime = parcel.readString()
        amount = parcel.readValue(Long::class.java.classLoader) as? Long
        ratio1 = parcel.readValue(Long::class.java.classLoader) as? Long
        serviceName = parcel.readString()
        type = parcel.readValue(Int::class.java.classLoader) as? Int
        amount1 = parcel.readValue(Long::class.java.classLoader) as? Long
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(orderNum)
        parcel.writeValue(payAmount)
        parcel.writeString(payTime)
        parcel.writeValue(amount)
        parcel.writeValue(ratio1)
        parcel.writeString(serviceName)
        parcel.writeValue(type)
        parcel.writeValue(amount1)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<SettlementIncomeRes> {
        override fun createFromParcel(parcel: Parcel): SettlementIncomeRes {
            return SettlementIncomeRes(parcel)
        }

        override fun newArray(size: Int): Array<SettlementIncomeRes?> {
            return arrayOfNulls(size)
        }
    }


}